<script>
export default {
  onLaunch: function () {
    console.log("App Launch");
    // plus.screen.lockOrientation('landscape-primary')
    this.$socket.socketTask.onMessage((res) => {
      //onMessage这个监听在封装的js中赋值给了socketTask对象
      // let data = null;
      // try {
      //   data = JSON.parse(res.data);
      // } catch (e) {}
      // console.log("data", data);
      // if (data != null && data.contactsName) {
      //   // 导航到议题表决页
      //   uni.navigateTo({
      //     url:
      //       "/pages/meeting-vote/meeting-vote?item=" +
      //       encodeURIComponent(JSON.stringify(data)),
      //     animationType: "none",
      //   });
      // }
    });
    console.log(this.$socket, "this.$socket");
  },
  onShow: function () {
    console.log("App Show");
  },
  onHide: function () {
    console.log("App Hide");
  },
};
</script>

<style lang="scss">
/*每个页面公共css */
//引入转换为vw
@import "@/static/css/_px2vw.scss";
//uview的样式
@import "uview-ui/index.scss";
//引入其他样式
@import "./App.scss";

// 调整tarbar栏位置
body {
  padding: 3vh 0;
  box-sizing: border-box;
}
uni-page-body > uni-view {
  display: flex;
  & > uni-view {
    height: 94vh;
  }
}
body > view {
  display: flex;
  flex-direction: row;
  & > view {
    height: 94vh;
  }
}
.u-tabbar__content.u-border-top {
  height: 94vh;
}
#tab {
  flex: 0 1 vw(120);
  .u-tabbar__content__item-wrapper {
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: vw(120);
    border-right: 1px solid rgb(170, 170, 170);
    .u-icon__img {
      width: vw(68) !important;
      height: vw(54) !important;
    }
    .u-tabbar-item__text {
      font-size: vw(18);
      font-weight: 700;
    }
  }
}
.right-content {
  // flex: 1;
  width: 87vw;
}
// 调整tarbar栏位置

uni-modal{
	z-index: 19999 !important;
	.uni-modal__bd {
		font-size: vw(17);
	}
}

uni-toast{
	p{
		font-size: vw(17) !important;
	}
}
</style>